# -*- mode: python; -*-

Import("env")

# TODO(sverch): 'lasterror' should not be required by 'foundation'.  Even if it is it should be
# depended on directly rather than here, but we currently have a triangle dependency between
# 'network', 'foundation' and 'lasterror'.  assert_util.cpp depends on lasterror.cpp which depends
# on sock.cpp which depends on assert_util.cpp.  Eventually we want to have an assertion library
# that does not depend on internal server code, and then this can go away.
env.Library("unittest", ['unittest.cpp', 'temp_dir.cpp'],
            LIBDEPS=['$BUILD_DIR/mongo/foundation',
                     '$BUILD_DIR/mongo/lasterror',
                     '$BUILD_DIR/mongo/util/options_parser/options_parser',
            ])

env.Library("unittest_main", ['unittest_main.cpp'],
            LIBDEPS=['unittest',
                     '$BUILD_DIR/mongo/base/base'])

env.Library("unittest_crutch", ['crutch.cpp'])


env.CppUnitTest('unittest_test', 'unittest_test.cpp')
env.CppUnitTest('fixture_test', 'fixture_test.cpp')
env.CppUnitTest('temp_dir_test', 'temp_dir_test.cpp')
